<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?>

<h2><?php print $header?></h2>
<p><?php echo $this->lang->line( 'menu_intro' ); ?></p>
<div class="buttons">                
	<a href="<?php print site_url( 'article/user/menu/type/' . $position )?>">
    <?php print $this->bep_assets->icon( 'add' );?>
    <?php print $this->lang->line( 'create_menu' )?>
    </a>
</div>
<br />
<br />
<br />
<?php print form_open('article/user/menu/delete/' . $position)?>
<table class="data_grid" cellspacing="0">
    <thead>
        <tr>
            <th width=5%><?php print $this->lang->line( 'menu_id' )?></th>
            <th><?php print $this->lang->line( 'menu_title' )?></th>
            <th width=5% class="middle"><?php print $this->lang->line( 'menu_active' )?></th> 
            <th width=10% class="middle"><?php print $this->lang->line( 'menu_up' )?></th>
            <th width=10% class="middle"><?php print $this->lang->line( 'menu_down' )?></th>
            <th width=5% class="middle"><?php print $this->lang->line( 'menu_edit' )?></th>
            <th width=10%><?php print form_checkbox( 'all', 'select', FALSE)?><?php print $this->lang->line( 'menu_delete' )?></th>        
        </tr>
    </thead>
    <tfoot>
        <tr>
            <td colspan="7">&nbsp;</td>
            <td><?php print form_submit( 'delete', $this->lang->line( 'menu_delete' ), 'onClick="return confirm(\''.$this->lang->line('menu_delete_confirm').'\');"')?></td>
        </tr>
    </tfoot>
    <tbody>
    	<tr>
            <td colspan="7">
            	<?php echo $menu_content; ?>
            	<script type="text/javascript">
				jQuery( function($) {
					$('#list-container').NestedSortable(
					  {
					    accept: 'sortable-element-class',
					  }
					);
					});
				</script>
        	</td>
        </tr>
    </tbody>
</table>
<?php print form_close()?>
